import request from '@/utils/request'

export const requirementsList = (data) => { //查询法律法规
  return request.request({
    url: '/project-quality/api/laws/page',
    method: 'post',
    data
  })
}
export const requirementsList1 = (data) => { //查询评价管理
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/page',
    method: 'post',
    data
  })
}
export const requirementsDetail = (id) => { //查询法律法规
  return request.request({
    url: '/project-quality/api/laws/'+id,
    method: 'get',
  })
}

export const evaluationManagementAdd = (data) => { //识别与评价管理 添加
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage',
    method: 'post',
    data
  })
}
export const evaluationManagementOne = (id) => { //查询法律法规编辑回显
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/'+id,
    method: 'get',
  })
}
//原 put
export const evaluationManagementEdit = (data) => { //识别与评价管理编辑
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/put',
    method: 'post',
    data
  })
}
//原 del 
export const evaluationManagementDelete = (id) => { //识别与评价管理删除
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/del/'+id,
    method: 'get',
  })
}
//原 put
export const evaluationManagementinvalid = (id,pan) => { //识别与评价管理失效
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/invalid/put/'+id+'/'+pan,
    method: 'get',
  })
}
export const evaluationManagementlevel = (id) => { //查询当前权限下的二级分公司
  return request.request({
    url: '/sys-center/api/system/dept/second/level',
    method: 'get',
  })
}
export const evaluationManagementUnit = (id) => { //获取选定评价单位
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/unit/'+id,
    method: 'get',
  })
}//原 put
export const evaluationManagementUnitAdd = (data) => { //获取选定评价单位
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/set/put/unit',
    method: 'post',
    data
  })
}
export const evaluationManagementDetailsList = (data) => { //识别与评价管理-详情-分页查询
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/detail/page',
    method: 'post',
    data
  })
}
export const evaluationManagementDetailsPage = (data) => { //识别与评价管理-详情-详情
  return request.request({
    url: '/project-quality/api/laws/evaluation/manage/detail/detail',
    method: 'post',
    data
  })
}
export const evaluationFillingAdd = (data) => { //识别与评价填报-新增-上报
  return request.request({
    url: '/project-quality/api/laws/evaluation/report',
    method: 'post',
    data
  })
}//原 put
export const evaluationFillingEdit = (data) => { //识别与评价填报-编辑
  return request.request({
    url: '/project-quality/api/laws/evaluation/report/put',
    method: 'post',
    data
  })
}
export const evaluationFillingReport = (id) => { //识别与评价填报-单条查询
  return request.request({
    url: '/project-quality/api/laws/evaluation/report/'+id,
    method: 'GET',
  })
}
export const evaluationFillingListfacilities = (data) => { //台账管理-设施台账-设施管理-查询权限内所有设施
  return request.request({
    url: '/project-quality/api/facility/get/list',
    method: 'POST',
    data
  })
}

export const evaluationFillingList = (data) => { //评价结果跟踪评价
  return request.request({
    url: '/project-quality/api/laws/evaluation/track/clause/page',
    method: 'POST',
    data
  })
}
//原 put
export const evaluationFillingTrack = (data) => { //评价结果跟踪全部评价-整改
  return request.request({
    url: '/project-quality/api/laws/evaluation/put/track',
    method: 'post',
    data
  })
}
export const evaluationFillingDetails = (id) => { //评价结果跟踪全部评价-通过主键查询单条数据
  return request.request({
    url: '/project-quality/api/laws/evaluation/track/'+id,
    method: 'GET',
  })
}
export const evaluationFillingExport=(data)=>{ //评价结果跟踪全部评价-导出
  return request({
    url: '/project-quality/api/laws/evaluation/track/export' ,
    responseType: 'arraybuffer',
    method: 'POST',
    data,
  })
}


export const evaluationFillingExportDown=(data)=>{ //合规性管理导入模板下载
  return request({
    url: '/project-quality/api/laws/evaluation/manage/download' ,
    responseType: 'arraybuffer',
    method: 'POST',
    data,
  })
}